#!/usr/bin/env python
# -*- coding: utf-8 -*-

import wx

def treta(event):
	print "Escolhido o item treta"
		
class Example(wx.Frame):
	def __init__(self, *args, **kwargs):
		super (Example, self).__init__(*args, **kwargs)
		self.InitUI()
	def InitUI(self):
		menubar = wx.MenuBar()
		fileMenu = wx.Menu()
		ftr = fileMenu.Append(103, 'Treta' , 'Treta')
		fit = fileMenu.Append(wx.ID_EXIT , 'Quit' , 'Quit')
		menubar.Append(fileMenu, '&File');
		self.SetMenuBar(menubar)
		self.Bind(wx.EVT_MENU, self.OnQuit,fit)
		self.Bind(wx.EVT_MENU, treta , ftr)
		self.SetSize((300,200));
		self.SetTitle('Menu')
		self.Centre(); self.Show(True)

	def OnQuit(self, e):
		self.Close()		

def main():
	ex = wx.App()
	Example(None)
	ex.MainLoop()

if __name__ == '__main__':
	main()
